package com.expdatacloud.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * IQC-检测表
 * </p>
 *
 * @author jie
 * @since 2019-11-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class IqcDetection implements Serializable {

    private static final long serialVersionUID = 1L;
    private String whseId;
    private String serialKey;

    /**
     * ASN/收货单
     */
    private String receiptKey;

    /**
     * 货主
     */
    private String shipper;

    /**
     * 物料描述
     */
    private String materialDesc;

    /**
     * 供应商代码
     */
    private String supplierKey;

    /**
     * 供应商名称
     */
    private String supplierName;

    /**
     * 外部收货单
     */
    private String extReceiptForm;

    /**
     * 接收量
     */
    private double receivedQty;

    /**
     * 收货时间
     */
    private String receiveTime;

    /**
     * 质检状态
     */
    private String qualityStatus;

    /**
     * 储位
     */
    private String storageLocation;

    /**
     * 备注
     */
    private String remark;

    /**
     * 待检数量
     */
    private double quarantineQuantity;

    /**
     * 抽检数量
     */
    private double samplingQuantity;

    public double getConformityQuantity() {
        return this.samplingQuantity-this.unqualifiedQuantity;
    }

    /**
     * 合格数量
     */
    private double conformityQuantity;

    /**
     * 不合格数量
     */
    private double unqualifiedQuantity;

    /**
     * 不良率
     */
    private String rejectRation;



    /**
     * 留样数量
     */
    private double sampleQuantity;

    /**
     * 拒收数量
     */
    private double rejectionQuantity;

    /**
     * 检验结果
     */
    private String checkResult;

    /**
     * 不良原因
     */
    private String culprit;

    /**
     * 行号
     */
    private String receiptLineNumber;

    /**
     * 储位
     */
    private String loc;

    /**
     * 物料编码
     */
    private String sku;

    /**
     * 实验类别
     */
    private String experimentType;

    /**
     * 实验数量
     */
    private String experimentNumber;

    /**
     * 判定方式（0接收、1拒收、2特采、3警急放行）
     */
    private String decideWay;
    private List decideWayList;

    public double getInventoryQuantity() {
        return quarantineQuantity - rejectionQuantity - sampleQuantity;
    }

    /**
     * 入库数量
     */
    private double inventoryQuantity;


    /**
     * 验退数量
     */
    private double checkBackQuantity;

    /**
     * 机型
     */
    private String modelKey;

    /**
     * 检验方案
     */
    private String checkScenarioName;
    /**
     * 质检类别
     */
    private String inspectionCategory;

    /**
     * 质检类别
     */
    private String inspectionCategoryDesc;

    private Date addDate;

    private String addWho;

    private String editDate;

    private String editWho;
    /**
     * 验证是否写入履历
     */
    private String toHistory;

    /**
     *  特采单号
     * */
    private String specialMiningOrder;

    private String file;

    /**
     *  附件名称
     * */
    private String fileName;

    /**
     * 检验项目状态
     */
    private String checkItemFlag;
}
